package com.kaigejava.command.oo;

import com.kaigejava.command.sdk.LightAPI;
import com.kaigejava.command.sdk.StereoAPI;

/**
 * Created by kaigejava on 2019/8/28.
 */
public class OOTest {
    public static void main(String[] args) {
        Control ctl;
        LightAPI light = new LightAPI("卧室");
        StereoAPI stereo = new StereoAPI();
        ctl = new TraditionOOControl(light, stereo);

        ctl.onButton(0);
        ctl.offButton(0);
        ctl.onButton(1);
        ctl.onButton(2);
        ctl.offButton(2);

        ctl.offButton(1);
    }
}
